function getElementsByClass(searchClass) {
	var classElements = new Array();
	if(searchClass.indexOf(".") == -1)
	{
			tag = '*';
	}
	else
	{
		var searchClass = searchClass.split(".");
		tag = searchClass[0];
		className = searchClass[1];
	}
	var elements = document.getElementsByTagName(tag);
	var elementsLength = elements.length;
	var classPattern = new RegExp("(^|\\\\s)"+className+"(\\\\s|$)");
	for (i = 0, j = 0; i < elementsLength; i++) {
		if ( classPattern.test(elements[i].className) ) {
			classElements[j] = elements[i];
			j++;
		}
	}
	return classElements;
}